import React, { useEffect, useState } from 'react'
import IndexRouter from './router/IndexRouter'
import store from './redux/store'

export default function App() {
  const [show, setShow] = useState(true)

  useEffect(() => {
    store.subscribe(() => {
      setShow(store.getState().show)
    })
  }, [])
  return (
    <div>
      <IndexRouter>
        {show && <ul>
          <li>电影</li>
          <li>影院</li>
          <li>我的</li>
        </ul>
        }
      </IndexRouter>
    </div>
  )
}
